<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.staticfile.org/pixi.js/5.1.5/pixi.js"></script>
    <style>
        html, body {
            padding: 0;
            margin: 0;
        }
    </style>
</head>
<body>

<script type="text/javascript">

  let Application = PIXI.Application,
    loader = PIXI.loader,
    resources = PIXI.loader.resources,
    TextureCache = PIXI.TextureCache,
    Rectangle = PIXI.Rectangle,
    Sprite = PIXI.Sprite;
  //Create a Pixi Application
  let app = new PIXI.Application({
      width: 256,         // default: 800
      height: 256,        // default: 600
      antialias: true,    // default: false
      transparent: false, // default: false
      resolution: 1       // default: 1
    }
  );
  //Add the canvas that Pixi automatically created for you to the HTML document
  app.renderer.view.style.position = "absolute";
  app.renderer.view.style.display = "block";
  app.renderer.autoResize = true;
  app.renderer.resize(window.innerWidth, window.innerHeight);

  function sto(f) {
    setTimeout(f, 300);
  }

  let sprite,sprite2;

    PIXI.loader
      .add("09.png")
      .load(function () {

        sprite = new PIXI.Sprite(
          PIXI.loader.resources["09.png"].texture
        );

        app.stage.addChild(sprite);
        sprite2 = new PIXI.Sprite(
          PIXI.loader.resources["09.png"].texture
        );

        app.stage.addChild(sprite2);

        // sto(() => {
        //   sprite.x = 100;
        //   sprite.y = 200;
        //   sprite.vx = 3;
        //   sto(() => {
        //     sprite.width = 80;
        //     sprite.height = 120;
        //     sto(() => {
        //       // sprite.anchor.x = 0.5;
        //       // sprite.anchor.y =0.5;
        //       sprite.pivot.set(32, 32);
        //       sprite.rotation = Math.PI / 2;
        //     });
        //   });
        //
        // });

        app.ticker.add(function () {
          sprite.x += 1.5;
          sprite2.x += 2;
        })
      });



  document.body.appendChild(app.view);
</script>
</body>
</html>
